//run.cpp
#include "Complex.h"
#include <iostream>
using namespace std;

template <typename T>
void printArray(T*, int);

template<> void printArray(Complex *, int);

int main() {
    Complex c[] = {Complex(2, 1), Complex(3, 2), Complex(-1, -2)};
    int arr1[] = {1, 2, 4, 5, 6, -12, 56};
    double arr2[] = {345.657, 4545546.54, 576.48, 57.489};
    printArray(c, 3);
    cout << endl;
    printArray(arr1, 7);
    cout << endl;
    printArray(arr2, 4);
    cout << endl;
    return 0;
}

template <typename T>
void printArray(T* t, int length) {
    cout << "[";
    for (int i = 0; i < length; i++) {
        if (i != length - 1) {
            cout << t[i] << ", ";
        } else {
            cout << t[i];
        }
    }
    cout << "]";
}

template<> void printArray(Complex * c, int length) {
    cout << "[";
    for (int i = 0; i < length; i++) {
        if (i != length - 1) {
            cout << c[i] << ", ";
        } else {
            cout << c[i];
        }
    }
    cout << "]";
}